<template>
    <div class="full-img-view" v-show="value" @click="onClose">
        <van-popup
            v-model="value"
            :overlay-style="{ background: 'rgba(0, 0, 0, 0.8)' }"
        >
            <div class="body">
                <img :src="src" />
            </div>
        </van-popup>
    </div>
</template>

<script>
export default {
    props: {
        src: String,
        value: Boolean
    },
    data() {
        return {};
    },

    methods: {
        onClose() {
            this.$emit("input", false);
        }
    }
};
</script>


<style lang="less" scoped>
.full-img-view {
    .body {
        width: 100vw;

        img {
            width: 100%;
        }
    }
    .full-img-view-mask {
        background: rgba(0, 0, 0, 0.9);
    }
}
</style>